#include<bits/stdc++.h>
using namespace std;
const int maxn = 1e5+5;
int a[maxn];
int n;
bool mp[maxn];
int main(){
    ios::sync_with_stdio(0);
    cin.tie(0);
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin>>n;
    int ans = 0;
    for(int i = 1;i<=n;i++)cin>>a[i];
    sort(a+1,a+1+n);
    for(int i = 1;i<=n;i++){
        if(a[i] == a[n])break;
        int pos = upper_bound(a+1,a+1+n,a[i])-a;
        while(pos<=n&&mp[pos])pos++;
        if(pos>n)break;
        mp[pos] = 1;
        ans++;
    }
    cout<<n-ans;
    return 0;
}
